// part1:C12:ex12.24.cpp
// dynamic array.
#include <iostream>
#include <cstring>
using namespace std;

int main(int argc, char **aragv)
{
    char ch;
    char *retch = new char[20];
    int len1 = 0;

    while (cin.get(ch)) 
    {
        if (isspace(ch)) 
        {
            break;
        }

        retch[len1++] = ch;
        if (len1 == 20) 
        {
            cout << "capacity is full!" << endl;
            break;
        }
    }
    retch[len1] = 0;
    cout << retch << endl;

    delete [] retch;
    
    return 0;
}